package com.yupi.springbootinit.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yupi.springbootinit.model.entity.Chart;
import com.yupi.springbootinit.service.ChartService;
import com.yupi.springbootinit.mapper.ChartMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
* @author asus
* @description 针对表【chart(图表信息表)】的数据库操作Service实现
* @createDate 2023-07-26 15:42:16
*/
@Service
public class ChartServiceImpl extends ServiceImpl<ChartMapper, Chart>
    implements ChartService{

    @Resource
    ChartMapper chartMapper;

    @Override
    public List<Map<String, Object>> queryChartData(String querySql) {
        return chartMapper.queryChartData(querySql);
    }

    @Override
    public List<Map<String, Object>> queryChartDataById(Long chartId) {
        return chartMapper.queryChartDataById(chartId);
    }

    @Override
    public boolean creatTable(Long id, String column1, String column2) {
        return chartMapper.creatTable(id,column1,column2);
    }

    @Override
    public boolean insertData(Long id,String data1, String data2) {
        return chartMapper.insertData(id,data1,data2);
    }

    @Override
    public boolean retryIncrease(Long id) {
        return chartMapper.retryIncrease(id);
    }

    @Override
    public List<Long> getChartListWithRetryNumber() {
        return chartMapper.getChartListWithRetryNumber();
    }
}




